package com.lrkj.payfee.mapper;

import java.util.List;
import com.lrkj.payfee.domain.RoomNorm;
import com.lrkj.payfee.vo.CurrentPeriodFeeVo;
import com.lrkj.payfee.vo.NormChargeVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 房屋收费标准Mapper接口
 *
 * @author yajun_ren
 * @date 2021-07-29
 */
public interface RoomNormMapper
{
    /**
     * 查询房屋收费标准
     *
     * @param roomNormId 房屋收费标准ID
     * @return 房屋收费标准
     */
    public RoomNorm selectRoomNormById(String roomNormId);

    /**
     * 查询房屋收费标准列表
     *
     * @param roomNorm 房屋收费标准
     * @return 房屋收费标准集合
     */
    public List<RoomNorm> selectRoomNormList(RoomNorm roomNorm);

    /**
     * 新增房屋收费标准
     *
     * @param roomNorm 房屋收费标准
     * @return 结果
     */
    public int insertRoomNorm(RoomNorm roomNorm);

    /**
     * 修改房屋收费标准
     *
     * @param roomNorm 房屋收费标准
     * @return 结果
     */
    public int updateRoomNorm(RoomNorm roomNorm);

    /**
     * 删除房屋收费标准
     *
     * @param roomNormId 房屋收费标准ID
     * @return 结果
     */
    public int deleteRoomNormById(String roomNormId);

    /**
     * 批量删除房屋收费标准
     *
     * @param roomNormIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteRoomNormByIds(String[] roomNormIds);

    /**
     * 批量新增
     *
     * @return 结果
     */
    public int doSaveList(@Param("saveBeans") List<RoomNorm> saveBeans);

    public List<RoomNorm> findByList(RoomNorm roomNorm);

    /**
     * 批量更新
     * **/
    public int updateByBatch(@Param("updateBeans") List<RoomNorm> batchBean);

    public RoomNorm getRoomNormByRoomId(@Param("roomId") String roomId,@Param("chargeId") String chargeId);

    /**
     * 查询房屋收费标准
     *
     * @param roomNormIds 房屋收费标准ID
     * @return 房屋收费标准
     */
    public List<RoomNorm> selectRoomNormByIds(String roomNormIds);

    /**
     * 获取仪表房间收费标准
     * @param nodeId 树节点ID
     * **/
    public List<RoomNorm> selectKindRoomNorm(String nodeId);


    /**
     * 获取每月未生成费用的房屋收费标准
     * **/
    public List<NormChargeVo> selectArrearageRoomNorm(NormChargeVo normChargeVo);


    //查询当前账期,未生成账单的费用项
    public List<CurrentPeriodFeeVo> currentPeriodFee(CurrentPeriodFeeVo currentPeriodFeeVo);


    /**
     * 根据房屋id修改状态
     * @param roomNorm
     * @return
     */
    public int updteByRoomId(RoomNorm roomNorm);


    /**
     * 根据房屋id查询是否存在房屋收费标准
     * @param roomId
     * @return
     */
    public int selRoomNormByRoomId(String roomId);


    public int updateByBatchByRoom(@Param("updateBeans") List<RoomNorm> batchBean);

}
